<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="../../common/web_top.jsp" %>

<title>职位设置</title>

<div ng-include="loanBefore" class="includeStyle "><!--定位div容器-->

    <div class="bgSortScroll">
        <div class="public-bgContent" ng-init="load()">
            <div class="public-bghint">
                <span ng-click="show('caozuo')" style="cursor: pointer;">提示操作</span>
                <i class="iconfont icon-icon-copy-copy"></i>
            </div>
            <ul class="public-ulList set-listH" ng-show="setShow.caozuo">
                <li>显示拥有该栏目管理权限的数据；</li>
                <li>拥有权限的管理员可以对职位进行增加，更新，删除操作</li>
                <li>拥有权限的管理员可以对职位的权限明细进行分配</li>
            </ul>
            <div style="height: 20px;"></div>
            <div class="table-scroll">
                <table class="power-table public-table PoInput table-set">
                    <thead>
                    <tr>
                        <td>选择</td>
                        <td>ID</td>
                        <td>职位名称</td>
                        <td>职位描述</td>
                        <td>操作</td>
                    </tr>
                    </thead>
                    <tbody id="body">
                    </tbody>
                    <tfoot class="public-botPage">
                    <tr>
                        <td>
                            <!-- 全选反选  -->
                            <input type="checkbox" name="checkboxAll" id="checkboxAll" style="margin-top:-15px"/>
                        </td>
                        <td colspan="12">
                            <div class="public-botPage-left">
							<span>
								<span>全选</span>
							</span>
                                <div class="se-re">
                                    <select class="tabHint table1" ng-model="selectType.default"
                                            ng-change="selectQuery('table1','ch_id')">
                                        <option value="-1" data-oper="">批量操作</option>
                                        <option ng-if="HbHr.hr221" value="1" path="set" params="remarks"
                                                param="url:deleteAdmins.do,name:删除用户,status:删除">批量删除
                                        </option>
                                        <%--<option ng-if="HbHr.hr222" value="2" path="set" params="remarks" param="url:updateAdminsEnable.do,name:禁用用户,status:禁用,locked:0">批量禁用</option>--%>
                                        <%--<option ng-if="HbHr.hr223" value="3" path="set" params="remarks" param="url:updateAdminsEnable.do,name:开启用户,status:开启,locked:1">批量开启</option>--%>
                                    </select>
                                    <span class="se-po"></span>
                                </div>
                                <button id="addTop" class="tabHint-alone tab-add">添加职位</button>
                            </div>
                            <div class="public-botPage-right">
                                <!-- 页码公共引进  'work/tems3/loanBefore/page/page.html'-->
                                <div ng-include="pageUrl" onload="pageOnload()"></div>
                            </div>
                        </td>
                    </tr>
                    </tfoot>
                </table>

                <div id="rights_window"></div>
            </div>


        </div>
        <%--动态显示所有权限--%>
        <script type="text/x-handlebars-template" id="role_tpl">
            {{#each .}}
            <tr class="table-tr-hover">
                <td><input type="checkbox" name="ch_id" value="{{id}}"/></td>
                <td>{{id}}</td>
                <td style="width: 100px">{{roleName}}</td>
                <td>{{description}}</td>
                <td>
                    <button class="tabedit ttw{{id}}" data-attr="editRole" data-id="{{id}}" data-name="{{roleName}}"
                            data-description="{{description}}" data-type="{{type}}">
                        编辑名称
                    </button>
                    <button class="tabHint tt{{id}}" data-attr="selectRights" data-id="{{id}}" data-name="{{roleName}}"
                            data-description="{{description}}" data-type="{{type}}">
                        权限明细
                    </button>
                    <button class="tabHint tt{{id}}" data-attr="deleteRight" data-id="{{id}}" data-name="{{roleName}}"
                            data-type="{{type}}">
                        删除职位
                    </button>
                </td>
            </tr>
            {{/each}}
        </script>

        <%--弹窗--%>
        <script type="text/x-handlebars-template" id="role_window_tpl">
            <div class="winBox add_winbox">
                <div class="winBox1">
                    <div class="winBox3">
                        <div class="dealrecord">
                            <!-- 头部 -->
                            <div class="headerBox">
                                <span class="headerSpan">添加职位</span>
                                <i class="iconfont icon-wrong headerIcon" id="show"></i>
                            </div>
                            <!-- 内容 -->
                            <%----%>
                            <div class="maContent contentBox">
                                <!-- 中间tab -->
                                <table class="maTab">
                                    <tbody>
                                    <input type="hidden" name="id" id="id" value="{{id}}">
                                    <tr>
                                        <td><span style="color: #D5332C;font-weight: bold;">*</span>职位名称：</td>
                                        <td>
                                            <input name="roleName" placeholder="请输入职位名称.." value="{{role_name}}"
                                                   id="name"/>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td><span style="color: #D5332C;font-weight: bold;">*</span>数据查看权限：</td>
                                        <td>
                                            <select id="auth">
                                                <option>请选择</option>
                                                <option value="4">查看自己</option>
                                                <option value="1">查看部门</option>
                                                <option value="2">查看分公司</option>
                                                <option value="3">查看全部</option>
                                            </select>
                                        </td>
                                    </tr>
                                    </tbody>
                                </table>
                                <!-- tab列表结束 -->
                                <!-- 底部 -->
                                <div class="deleFooter footerBox">
                                    <div class="beizhu assBeizhu">职位描述：</div>
                                    <textarea name="description" id="description" ng-model="param.description"
                                              data-tag="textLength" showtag="zishuxians"
                                              class="ng-pristine ng-untouched ng-valid ng-valid-maxlength ng-not-empty">{{description}}</textarea>
                                    <div class="deleBtn">
                                        <button style="background: #E55A5B;" id="submit">确定提交</button>
                                    </div>
                                    <div class="zishu">
                                        <i id="zishuxians">0</i>/120字
                                    </div>
                                </div>
                            </div>
                            <%----%>
                            <%--<div class="contentBox" style="padding-bottom: 50px;">--%>
                            <%--<!-- 中间tab -->--%>
                            <%--<table class="maTab">--%>
                            <%--<tbody>--%>
                            <%--<input type="hidden" name="id"  id="id" value="{{id}}">--%>

                            <%--<tr>--%>
                            <%--<td><span style="color: #D5332C;font-weight: bold;">*</span>职位名称：</td>--%>
                            <%--<td>--%>
                            <%--<input name="roleName" placeholder="请输入职位名称.." value="{{role_name}}" id="name"/>--%>
                            <%--</td>--%>
                            <%--</tr>--%>
                            <%--&lt;%&ndash;<tr>&ndash;%&gt;--%>
                            <%--&lt;%&ndash;<td><span style="color: #D5332C;font-weight: bold;">*</span>职位描述：</td>&ndash;%&gt;--%>
                            <%--&lt;%&ndash;&lt;%&ndash;<input name="description" placeholder="请输入职位描述.." value="{{description}}" id="description"  type="text" autocomplete="off"/>&ndash;%&gt;&ndash;%&gt;--%>
                            <%--&lt;%&ndash;<td>&ndash;%&gt;--%>
                            <%--&lt;%&ndash;<textarea name="description" placeholder="请输入职位描述.."   id="description"  style="width: 80%;height: 100%" >{{description}}</textarea>&ndash;%&gt;--%>
                            <%--&lt;%&ndash;</td>&ndash;%&gt;--%>
                            <%--&lt;%&ndash;</tr>&ndash;%&gt;--%>
                            <%--</tbody>--%>
                            <%--</table>--%>
                            <%--<div class="deleFooter footerBox">--%>
                            <%--<div class="beizhu assBeizhu">职位描述：</div>--%>
                            <%--<textarea name="description" id="description" data-tag="textLength"   style="width: 560px;height: 100px">{{description}}</textarea>--%>
                            <%--<div class="zishu">--%>
                            <%--<i id="zishuxians">0</i>/120字--%>
                            <%--</div>--%>
                            <%--<!-- 底部 -->--%>
                            <%--<div class="deleFooter footerBox">--%>
                            <%--<div class="deleBtn">--%>
                            <%--<button style="background: #E55A5B;" id="submit">确定提交</button>--%>
                            <%--</div>--%>
                            <%--</div>--%>
                            <%--</div>--%>

                            <%--</div>--%>
                        </div>
                    </div>
                </div>
            </div>
        </script>

        <%--弹窗--%>
        <script type="text/x-handlebars-template" id="selectRights_tpl">
            <div class="winBox">
                <div class="winBox1">
                    <div class="winBox3">
                        <div class="dealrecord">
                            <!-- 头部 -->
                            <div class="headerBox">
                                <span class="headerSpan">编辑角色</span>
                                <i class="iconfont icon-wrong headerIcon" id="close"></i>
                            </div>
                            <!-- 内容 -->
                            <div class="contentBox" style="padding-bottom: 50px;">
                                <div class="set-title-name">
                                    权限地图:
                                </div>
                                <div class="lims-map">
                                    <input type="checkbox"/> 勾选全部权限
                                    <ul id="tree" class="filetree" Collapsed="false">

                                    </ul>
                                </div>

                                <!-- 底部 -->
                                <div class="deleFooter footerBox">
                                    <div class="deleBtn">
                                        <button style="background: #E55A5B;" id="addRights">确定提交</button>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </script>
    </div>
    <div id="role_window"></div>

    <%--禁用、开启、删除用户弹窗--%>
    <div class="winBoxDelect_gray"
         style="position: absolute;display: none; top: 0px; left: 0px; width: 100%; height: 100%; z-index: 0; background-color: rgba(0, 0, 0, 0.5);"></div>
    <div class="winBoxDelect" style="display: none;">
        <!-- 加载弹窗盒子容器 -->
        <!-- ngInclude: box -->
        <div class="winBox1 " ng-include="box">
            <div class="winBox2 ">
                <remarksadmin><!-- 头部 -->
                    <div class="headerBox">
                        <span class="headerSpan  winBoxDelect_title">删除用户</span>
                        <i class="iconfont icon-wrong headerIcon winBoxDelect_hidePop"
                           onclick="winBoxDelect_hidePop()"></i>
                    </div>
                    <!-- 内容 -->
                    <div class="deleBox">
                        <!-- 中间列表 -->
                        <div class="deleteTit">
                            <i class="iconfont icon-tips2"></i>
                            <span class=" winBoxDelect_content">您确定要删除所选的用户吗？</span>
                        </div>
                        <div class="beizhu"><span>*</span>输入原因：</div>
                        <textarea class="delect_reason" data-tag="textLength" showtag="zishuxians"
                                  class="ng-pristine ng-untouched ng-valid ng-empty ng-valid-maxlength"></textarea>
                        <!-- 底部 -->
                        <div class="deleFooter">
                            <div class="deleBtn">
                                <button class="delectBtn">确定提交</button>
                                <button onclick="winBoxDelect_hidePop()">取消</button>
                            </div>
                            <div class="zishu">
                                <i id="">120</i>字
                            </div>
                        </div>
                    </div>

                </remarksadmin>
            </div>
        </div>
    </div>

    <%--是否删除弹窗--%>
    <div class="winBox delete_winBox">
        <!-- 加载弹窗盒子容器 -->
        <!-- ngInclude: box -->
        <div class="winBox1 " ng-include="box"><!-- 说明：提交评审弹窗 -->
            <div class="winBox5 ">
                <div>
                    <div class="headerBox">
                        <!-- ngIf: recheckLoan==2 --><span class="headerSpan " ng-if="recheckLoan==2">删除职位</span>
                        <!-- end ngIf: recheckLoan==2 -->
                        <!-- ngIf: recheckLoan==1 -->
                        <!-- ngIf: recheckLoan==3 -->
                        <i class="iconfont icon-wrong headerIcon" ng-click="F.showWin('hide')"></i>
                    </div>
                    <!-- 内容 -->
                    <div class="deleBox">
                        <!-- 底部 -->
                        <div class="deleteTit">
                            <span class="first"><i class="iconfont icon-tips2"></i></span>
                            <!-- ngIf: recheckLoan==1 || recheckLoan==2 --><span
                                ng-if="recheckLoan==1 || recheckLoan==2" class="">您确定删除该职位？</span>
                            <!-- end ngIf: recheckLoan==1 || recheckLoan==2 -->
                            <!-- ngIf: recheckLoan==3 -->
                        </div>
                        <div class="deleFooter" style="padding: 0;">
                            <div class="deleBtn">
                                <button ng-click="btn()" id="sureDelete"
                                        style="margin: 0;margin-bottom: 30px;margin-left: 68px;">确认
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script type="text/javascript" src="static/js/page/set/joblist/job_list.js?_v=190102162154"></script>
    <%@ include file="../../common/web_bottom.jsp" %>
</div>
